import request from '@/utils/request'

// 查询扫码报警列表
export function listQrcode(query) {
  return request({
    url: '/callPolice/manager/qrcode/list',
    method: 'get',
    params: query
  })
}

// 查询扫码报警详细
export function getQrcode(id) {
  return request({
    url: '/callPolice/manager/qrcode/' + id,
    method: 'get'
  })
}

// 新增扫码报警
export function addQrcode(data) {
  return request({
    url: '/callPolice/manager/qrcode',
    method: 'post',
    data: data
  })
}

// 修改扫码报警
export function updateQrcode(data) {
  return request({
    url: '/callPolice/manager/qrcode',
    method: 'put',
    data: data
  })
}

// 删除扫码报警
export function delQrcode(id) {
  return request({
    url: '/callPolice/manager/qrcode/' + id,
    method: 'delete'
  })
}

// 导出扫码报警
export function exportQrcode(query) {
  return request({
    url: '/callPolice/manager/qrcode/export',
    method: 'get',
    params: query
  })
}
//下载
export function qrCodeImage(ids) {
  return request({
    url: '/callPolice/manager/qrcode/qrCodeImage/' + ids,
    method: 'get',
  })
}
//批量生成
export function createQrCodeImage(num) {
  return request({
    url: '/callPolice/manager/qrcode/createQrCodeImage/' + num,
    method: 'post',
  })
}

// 上传图片
export function analysisQrCodeZip(data) {
  return request({
    url: '/callPolice/manager/qrcode/analysisQrCodeZip',
    method: 'post',
    data: data
  })
}